#version 460
#extension GL_GOOGLE_include_directive : enable
#extension GL_EXT_scalar_block_layout : enable

#include "../../../../core/shader_binding_ID.h"


layout(points) in;
layout(points, max_vertices=3) out;


layout(std430, set = 2, scalar, column_major, binding = 0) readonly buffer Buf2 {
	uint InstanceColor[];
};


layout(location = 0) in vec4 vColor[];
layout(location = 1) in vec3 vNormal[];
layout(location = 2) in uint vShaderType[];

in gl_PerVertex {
	vec4 gl_Position;
}gl_in[];


layout(location = 0) out vec4 outColor;
layout(location = 1) out vec3 outNormal;
layout(location = 2) out uint outShaderType;

out gl_PerVertex {
	vec4	gl_Position;
};



void main(void){
	
	for (uint i=0; i<3; ++i) {
		gl_Position = gl_in[i].gl_Position;
		outColor = vColor[i];
		outNormal = vNormal[i];
		outShaderType = vShaderType[i];

		EmitVertex();
	}

	EndPrimitive();
}



